namespace BuildingBlocks.Core.Interfaces;

public interface IRepository<Entity, Tkey> where Entity : class
{
    Task<Entity> GetByIdAsync(Tkey id);
    Task<IEnumerable<Entity>> GetAllAsync(string? filter = null, CancellationToken cancellationToken = default);
    Task AddAsync(Entity entity);
    Task UpdateAsync(Entity entity);
    Task DeleteAsync(Tkey id);
}

